package com.eonmind.ai.converts;

import com.eonmind.common.provider.entity.ai.ChatMessage;
import org.springframework.ai.chat.messages.Message;

public class ChatMessageConvert {


    public static ChatMessage messagetoChatMessage(String conversationId, Message message) {
        ChatMessage chatMessage = new ChatMessage();
        chatMessage.setConversationId(conversationId);
        chatMessage.setMessageType(message.getMessageType().name());
        chatMessage.setTextContent(message.getText());
        return chatMessage;
    }


}



